//package com.example.vae.Dao;
//
//
//import android.os.Bundle;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.Button;
//import android.widget.SeekBar;
//
//import androidx.annotation.Nullable;
//import androidx.databinding.DataBindingUtil;
//import androidx.fragment.app.Fragment;
//import androidx.lifecycle.ViewModelProviders;
//import androidx.navigation.NavController;
//import androidx.navigation.Navigation;
//
//import com.example.myapplication.databinding.FragmentHomeBinding;
//
//
///**
// * A simple {@link Fragment} subclass.
// */
//public class HomeFragment extends Fragment {
//    private MyViewModel myViewModel;
//    FragmentHomeBinding binding;
//
//    public HomeFragment() {
//        // Required empty public constructor
//    }
//
//
//    @Override
//    public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                             Bundle savedInstanceState) {
//
//        myViewModel= ViewModelProviders.of(getActivity()).get(MyViewModel.class);
//        binding= DataBindingUtil.inflate(inflater,R.layout.fragment_home,container,false);
//        binding.setData(myViewModel);
//        binding.setLifecycleOwner(getActivity());
//        binding.seekBar.setProgress(myViewModel.getNumber().getValue());
//        binding.seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
//            @Override
//            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
//                myViewModel.getNumber().setValue(progress);
//            }
//
//            @Override
//            public void onStartTrackingTouch(SeekBar seekBar) {
//
//            }
//
//            @Override
//            public void onStopTrackingTouch(SeekBar seekBar) {
//
//            }
//        });
////        return inflater.inflate(R.layout.fragment_home, container, false);
//        return  binding.getRoot();
//    }
//
//    @Override
//    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
//        super.onActivityCreated(savedInstanceState);
//        Button button=getView().findViewById(R.id.button2);
//        button.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                NavController controller= Navigation.findNavController(v);
//                Bundle bundle=new Bundle();
//                bundle.putString("name","joker");
//                controller.navigate(R.id.action_homeFragment_to_testFragment,bundle);
//            }
//        });
//    }
//}
